

public class MidiIn 
{
	public long lastOnset;
	public int[] pitch;
	public void newNote(int pitch, int velocity, long rhythm){
		System.out.println("newnote = "+pitch + " onset = "+(int)(rhythm));
		Main.pchIn[Main.pchIn.length-1]=AltMath.incArray(Main.pchIn[Main.pchIn.length-1]);
		Main.pchIn[Main.pchIn.length-1][Main.pchIn[Main.pchIn.length-1].length-1]=pitch;
		Main.velIn[Main.velIn.length-1]=AltMath.incArray(Main.velIn[Main.velIn.length-1]);						
		Main.velIn[Main.velIn.length-1][Main.velIn[Main.velIn.length-1].length-1]=velocity;
		Main.rhyIn[Main.rhyIn.length-1]=AltMath.incArray(Main.rhyIn[Main.rhyIn.length-1]);	
		System.out.print("rhythm = ");
		for (int i=0;i<Main.rhyIn[Main.rhyIn.length-1].length;i++) {
			System.out.print(Main.rhyIn[Main.rhyIn.length-1][i]+", ");
		}
		System.out.println();
		Main.rhyIn[Main.rhyIn.length-1][Main.rhyIn[Main.rhyIn.length-1].length-1]=(int) (rhythm);
	}
}
